using System;
using System.Collections;
using System.Collections.Generic;
using PureMVC.Interfaces;
using PureMVC.Patterns.Facade;
using UnityEngine;

public class ApplicationFacade : Facade
{
    public static readonly ApplicationFacade Instance = new ApplicationFacade();

    public void StartUp()
    {
        RegisterCommds();
        RegisterProxys();
        RegisterMediators();
    }

    private void RegisterCommds()
    {
        RegisterCommand(Notifications.RandomBtnClick, () => new HpCommand());
        RegisterCommand(Notifications.ResetBtnClick, () => new HpCommand());
    }
    
    private void RegisterProxys()
    {
        RegisterProxy(new HpProxy("HpProxy"));
    }
    
    private void RegisterMediators()
    {
        RegisterMediator(new HpBtnMediator("HpBtnMediator", GameObject.FindGameObjectWithTag("UIRoot")));
        RegisterMediator(new HpMediator("HpMediator", GameObject.FindGameObjectWithTag("UIRoot")));
    }
}
